version: '3.0'

services:
  geoserver:
    image: ogccite/geoserver:wfs10
    depends_on:
      - postgres
    build:
      args:
        GEOSERVER_DATA_DIR_SRC: "./wfs10/citewfs-1.0"

  teamengine:
    volumes:
      - ./wfs10/wfs-1.0.0.xml:/home/teamengine/te_base/forms/wfs-1.0.0.xml
    command: /run-test.sh wfs10

  postgres:
    image: ogccite/postgres:wfs10
    build:
      context: .
      dockerfile: ./postgres/Dockerfile
    ports:
      - 5432
    env_file:
      - ./.env
      - ./postgres/postgres.env
    volumes:
    - pg_data:${PGDATA:-/var/lib/postgresql/data}:rw
    - ./wfs10/01-init-user.sh:/docker-entrypoint-initdb.d/01-init-user.sh
    - ./wfs10/02-init-db.sql.gz:/docker-entrypoint-initdb.d/02-init-db.sql.gz
    - ./wfs10/postgresql.conf:/etc/postgresql/postgresql.conf

volumes:
  pg_data:
